package com.example.dante.a17376060_wanghaikang_finaltest.cn.example.main.cn.example.downloadaction;

import java.io.File;

public class Delete {
    public Integer fileDelete(String args) {
        try {
            File file = new File(args);
            if (file.delete()) {
                System.out.println(file.getName() + "删除了");
                return 1;
            } else {
                System.out.println("删除失败");
                return 0;
            }
        } catch (Exception e) {
            System.out.println("Exception occured");
            e.printStackTrace();
        }
        return 0;
    }
}
